package biz

import (
	"context"

	"gitee.com/shuokeyun/merchant-service/internal/domain"
)

var _ domain.MerchantUsecase = (*merchantUsecase)(nil)

type merchantUsecase struct {
	merchantRepo domain.MerchantRepo
}

func NewMerchantUsecase(merchantRepo domain.MerchantRepo) domain.MerchantUsecase {
	return &merchantUsecase{
		merchantRepo: merchantRepo,
	}
}

func (m *merchantUsecase) ListMerchants(ctx context.Context, search *domain.SearchMerchantList) ([]*domain.Merchant, int32, error) {
	//TODO implement me
	panic("implement me")
}

func (m *merchantUsecase) GetMerchant(ctx context.Context, id int32, fields []string) (*domain.Merchant, error) {
	return m.merchantRepo.GetItem(ctx, id, fields)
}

func (m *merchantUsecase) CreateMerchant(ctx context.Context, do *domain.Merchant) (*domain.Merchant, error) {
	//TODO implement me
	panic("implement me")
}

func (m *merchantUsecase) UpdateMerchant(ctx context.Context, do *domain.Merchant, fields []string) (*domain.Merchant, error) {
	//TODO implement me
	panic("implement me")
}
